package net.maku.infra.biz.pojo.file;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;
import net.maku.infra.biz.core.file.FileClientConfig;

/**
 * 
 * @TableName infra_file_config
 */
@TableName(value ="infra_file_config",autoResultMap = true)
@Accessors(chain = true)
@Data
public class InfraFileConfigPojo implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 配置名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 存储器
     */
    @TableField(value = "storage")
    private Integer storage;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 是否为主配置
     */
    @TableField(value = "master")
    private Boolean master;

    /**
     * 存储配置
     */
    @TableField(typeHandler = JacksonTypeHandler.class,value = "config")
    private FileClientConfig config;

    /**
     * 创建者
     */
    @TableField(value = "creator")
    private String creator;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新者
     */
    @TableField(value = "updater")
    private String updater;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "deleted")
    private Boolean deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}